//
//  BRCouponModel.h
//  BrezzeSaaS
//
//  Created by IOS on 2022/1/26.
//  Copyright © 2022 Brezze GWG. All rights reserved.
//

#import "BRBaseModel.h"
#import "BRLanguageManager.h"
NS_ASSUME_NONNULL_BEGIN

@class BRCouponDeductionModel;

@interface BRCouponModel : BRBaseModel

/// 抵扣金额
@property (nonatomic,strong) NSDecimalNumber *amount;
///deduction    抵扣对象    string
@property (nonatomic,strong) BRCouponDeductionModel *deduction;
/// 抵扣类型：1-金额 2-时间 3-折扣
@property (nonatomic,assign) NSInteger deductionType;
/// 是否不可兑换（仅限积分兑换）: 0-false 1-true
@property (nonatomic,assign) BOOL disabled;
/// 折扣
@property (nonatomic,assign) NSInteger discount;
/// 优惠券表id
@property (nonatomic,assign) NSInteger couponId;
/// 使用优惠券表id 唯一
@property (nonatomic,assign) NSInteger userCouponId;
/// 积分
@property (nonatomic,assign) NSInteger point;
/// 状态：1-未使用 2-已使用 3-已过期
@property (nonatomic,assign) NSInteger state;
/// 原价
@property (nonatomic,strong) NSDecimalNumber *price;
/// 促销价
@property (nonatomic,strong) NSDecimalNumber *promotionPrice;
/// 购买数量
@property (nonatomic,assign) NSInteger quantity;
/// 商家名称
@property (nonatomic,strong) NSString *merchantNameList;
/// 兑换率
@property (nonatomic,strong) NSNumber *redeemedRate;
/// 开始时间
@property (nonatomic,strong) NSString *startTime;
/// 到期时间
@property (nonatomic,strong) NSString *endTime;
///validDay    有效天数，领取后生效 单位天
@property (nonatomic,assign) NSInteger validDay;
/// 抵扣时间(json)
@property (nonatomic,strong) NSString *time;
/// 优惠券名称
@property (nonatomic,strong) NSString *title;
/// 是否选中 （用优惠券选择）
@property (nonatomic,assign) BOOL isSel;

@property (nonatomic,strong) BRLanguageKeyModel *descriptionStr;

@end

@interface BRCouponTimeModel : BRBaseModel

@property (nonatomic,assign) NSInteger day;
@property (nonatomic,assign) NSInteger hour;
@property (nonatomic,assign) NSInteger minute;

@end

@interface BRCouponListModel : BRBaseModel

///deduction    抵扣对象    string
@property (nonatomic,strong) BRCouponDeductionModel *deduction;
///deductionType    抵扣类型：1-免费时长 2-优惠金额 3-金额折扣    integer(int32)
@property (nonatomic,assign) NSInteger deductionType;
///description    描述    string
@property (nonatomic,strong) BRLanguageKeyModel *descriptionStr;
///endTime    有效结束时间    string(date-time)
@property (nonatomic,strong) NSString *endTime;
///exchangeEffectiveDays    有效天数，领取后生效    integer(int32)
@property (nonatomic,assign) NSInteger exchangeEffectiveDays;
///exchangePoint    兑换积分    number
@property (nonatomic,strong) NSNumber *exchangePoint;
///id    优惠券表id    integer(int32)
@property (nonatomic,assign) NSInteger couponId;
///merchantNameList    商家名称    string
@property (nonatomic,strong) NSString *merchantNameList;
///point    积分    integer(int32)
@property (nonatomic,assign) NSInteger point;
///redeemedNum    已兑换数量    integer(int32)
@property (nonatomic,assign) NSInteger redeemedNum;
///redeemedRate    兑换率    number
@property (nonatomic,strong) NSNumber *redeemedRate;
///startTime    有效起始时间    string(date-time)
@property (nonatomic,strong) NSString *startTime;
///stockNum    库存数量，为0表示不可兑换    integer(int32)
@property (nonatomic,assign) NSInteger stockNum;
///stockType    库存类型：1.设置数量 2.无限制    integer(int32)
@property (nonatomic,assign) NSInteger stockType;
///title    优惠券名称    string
@property (nonatomic,strong) NSString *title;
///usageLimit    每人使用限制    integer(int32)
@property (nonatomic,assign) NSInteger usageLimit;
///usageMethod    使用方式：1.自动扣除 2.手动选择    integer(int32)
@property (nonatomic,assign) NSInteger usageMethod;

@end

@interface BRCouponDeductionModel : BRBaseModel
/// 抵扣类型:1-免费时长 2-优惠金额 了-金额折扣"
@property (nonatomic,assign) NSInteger type;

/// type1-免费时长值
@property (nonatomic,assign) NSInteger type1FreeDurationVal;
/// type1-免费时长单位:1-分钟 2-小时
@property (nonatomic,assign) NSInteger type1FreeDurationUnit;
/// type1-优惠条件:1-最少租用时间 2-不限制
@property (nonatomic,assign) NSInteger type1DiscountCondition;
/// type1-最少租用时间
@property (nonatomic,assign) NSInteger type1MinRentalTime;
/// type1-最少租用时间单位:1-分钟 2-小时
@property (nonatomic,assign) NSInteger type1MinRentalTimeUnit;

/// type2-优惠条件:1-最低租金金额 2-不限制
@property (nonatomic,assign) NSInteger type2Discountcondition;
/// type2-优惠金额
@property (nonatomic,strong) NSDecimalNumber *type2DiscountAmount;
/// type2-最低租金金额
@property (nonatomic,strong) NSDecimalNumber *type2MinRentalAmount;

/// type3-优惠条件:1-最低租金金额 2-不限制
@property (nonatomic,assign) NSInteger type3Discountcondition;
/// type3-租金折扣
@property (nonatomic,assign) CGFloat type3DiscountAmount;
/// type3-最低租金金额
@property (nonatomic,strong) NSDecimalNumber *type3MinRentalAmount;

@end

NS_ASSUME_NONNULL_END
